<template>
  <div class="wrapper">
  <swiper ref="mySwiper" :options="swiperOptions">
    <swiper-slide>
        <img class="swiper-img" src="http://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/20205/1103d0790e9609a033c7df10e1d2369c.jpg_890x330_58e50d12.jpg"/>
    </swiper-slide>
    <swiper-slide>
        <img class="swiper-img" src="https://mp-piao-admincp.qunarzz.com/mp_piao_admin_mp_piao_admin/admin/20205/7d778d17db84a63a847eccccbb296afe.jpg_890x330_72ca795d.jpg"/>
    </swiper-slide>
    <div class="swiper-pagination" slot="pagination"></div>
  </swiper>
  </div>
</template>

<script>
export default {
  name: 'HomeSwiper',
  data () {
    return {
      swiperOptions: {
        pagination: {
          el: '.swiper-pagination',
          loop: true
        }
      }
    }
  },
  computed: {
    swiper () {
      return this.$refs.mySwiper.$swiper
    }
  },
  mounted () {
    this.swiper.slideTo(1, 2000, true)
  }
}
</script>

<style lang="stylus" scoped>
.swiper-img
    width 100%
</style>
